﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace ForumsBrowser.DataObjects
{
    [XmlRoot("message")]
    public class Message : IGuidIdObject
    {
        [XmlAttribute("id")]
        public Guid Id { get; set; }
        [XmlAttribute("parent")]
        public Guid ParentId { get; set; }
        [XmlAttribute("root")]
        public bool Root { get; set; }
        [XmlAttribute("authorId")]
        public Guid AuthorId { get; set; }
        [XmlAttribute("helpfulVotes")]
        public int HelpfulVotes { get; set; }
        [XmlAttribute("hasCode")]
        public bool HasCode { get; set; }
        [XmlAttribute("abusive")]
        public bool Abusive { get; set; }
        [XmlElement("createdOn")]
        public string CreatedOn { get; set; }
        [XmlElement("body")]
        public string Body { get; set; }
        [XmlElement("url")]
        public string Url { get; set; }
        [XmlElement("answer")]
        public bool Answer { get; set; }
        [XmlElement("status")]
        public string Status { get; set; }
        [XmlElement("deleted")]
        public bool Deleted { get; set; }
        [XmlElement("subject")]
        public string Subject { get; set; }

        [XmlArray("histories")]
        [XmlArrayItem("history")]
        public List<History> Histories { get; set; }
        
    }
}
